import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-09-25
 * Time: 19:52
 */
public class test_3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int[][] nums=new int[n+1][n+1];
            nums[1][1]=1;
            for (int i = 2; i <=n; i++) {
                for (int j = 1; j <=i ; j++) {
                    nums[i][j]=nums[i-1][j-1]+nums[i-1][j];
                }
            }

            for (int i = 1; i <=n; i++) {
                for (int j = 1; j <=i ; j++) {
                   StringBuffer stringBuffer=new StringBuffer();
                    int len = Integer.toString(nums[i][j]).length();
                    for(int k = 0; k < 5 - len; k++)
                    {
                        stringBuffer.append(" ");
                    }
                    System.out.print(stringBuffer.toString() + nums[i][j]);
                }
                System.out.println();
            }
        }
    }
}
